Skip to content

Add support for client-rendered widgets#24353

Merged
sgiehl merged 5 commits into5.x-devfrom
client-rendered-widgets
Apr 29, 2026
Merged

Add support for client-rendered widgets#24353
sgiehl merged 5 commits into5.x-devfrom
client-rendered-widgets

Conversation

@sgiehl
Copy link
Copy Markdown
Member

@sgiehl sgiehl commented Apr 10, 2026

Description

Adds a new widget mode where widgets can be registered as Vue components instead of being rendered through the legacy
backend HTML controller/action flow.

This keeps PHP-side widget registration and metadata intact, but lets the frontend render supported widgets directly
without sending a backend widget HTML request. To preserve compatibility, widgetized iframe URLs using
moduleToWidgetize / actionToWidgetize now fall back to a generic Vue bootstrap for client-rendered widgets.

As a first pilot, the Transitions widget was migrated to this new mode.

Changes

  • add optional client-rendered widget metadata to WidgetConfig
  • expose client widget metadata through API.getWidgetMetadata
  • add a direct Vue render path in CoreHome.Widget
  • add a ClientWidgetRenderer for loading widget components from plugin UMD bundles
  • preserve old widgetize iframe URLs through a fallback in Widgetize.iframe
  • avoid backend HTML requests for client-rendered widgets in dashboard widget loading
  • migrate Transitions.GetTransitions to the client-rendered widget path
  • remove the obsolete server-rendered Transitions widget HTML template/render method

Checklist

  • [✔] I have understood, reviewed, and tested all AI outputs before use
  • [✔] All AI instructions respect security, IP, and privacy rules

Review

@sgiehl sgiehl added c: Usability For issues that let users achieve a defined goal more effectively or efficiently. c: Design / UI For issues that impact Matomo's user interface or the design overall. Technical debt Issues the will help to reduce technical debt labels Apr 10, 2026
@sgiehl sgiehl force-pushed the client-rendered-widgets branch 2 times, most recently from ecfd7b5 to 5953b5f Compare April 13, 2026 13:26
@sgiehl sgiehl added this to the 5.10.0 milestone Apr 13, 2026
@sgiehl sgiehl force-pushed the client-rendered-widgets branch 2 times, most recently from 5b9ed7b to 0d03be2 Compare April 13, 2026 16:16
@sgiehl sgiehl marked this pull request as ready for review April 14, 2026 14:13
@sgiehl sgiehl force-pushed the client-rendered-widgets branch 3 times, most recently from 382bc56 to 5e3f3ce Compare April 23, 2026 12:59
@sgiehl sgiehl requested a review from a team April 23, 2026 13:28
@sgiehl sgiehl force-pushed the client-rendered-widgets branch from 528c841 to 1c98379 Compare April 23, 2026 13:29
Copy link
Copy Markdown
Contributor

@chippison chippison left a comment

Choose a reason for hiding this comment

The reason will be displayed to describe this comment to others. Learn more.

Aside from the comment below, everything looks good.

Comment thread plugins/Widgetize/Controller.php
@sgiehl sgiehl force-pushed the client-rendered-widgets branch from 1c98379 to 3a68a78 Compare April 28, 2026 12:02
@sgiehl sgiehl force-pushed the client-rendered-widgets branch from 3a68a78 to 30aad04 Compare April 28, 2026 13:45
@sgiehl sgiehl requested a review from a team April 28, 2026 17:07
@sgiehl sgiehl merged commit e736d33 into 5.x-dev Apr 29, 2026
30 checks passed
@sgiehl sgiehl deleted the client-rendered-widgets branch April 29, 2026 07:18
Sign up for free to join this conversation on GitHub. Already have an account? Sign in to comment

Labels

c: Design / UI For issues that impact Matomo's user interface or the design overall. c: Usability For issues that let users achieve a defined goal more effectively or efficiently. Technical debt Issues the will help to reduce technical debt

Development

Successfully merging this pull request may close these issues.

2 participants